package easy.id_601_700;

public class Lee657 {
    public static void main(String[] args) {

    }
    //超级简单，不必做了
    public static boolean judgeCircle(String moves) {
        int x = 0;
        int y = 0;
        for (int i = 0; i < moves.length(); i++) {
            if (moves.charAt(i) == 'R') {
                x++;
            } else if (moves.charAt(i) == 'L') {
                x--;
            } else if (moves.charAt(i) == 'U') {
                y++;
            } else if (moves.charAt(i) == 'D') {
                y--;
            }
        }
        return x == 0 && y == 0 ? true : false;
    }
}
